package com.heny.demo.common;

/**
 * @author litao.cc
 * @version CommonException.java v0.1 t2025/4/24 1:21
 * @date 2025/4/24 1:21
 * @description CommonException
 */
public class CommonException extends RuntimeException{

    private CommonErrorCode errorCode;
    public CommonException(CommonErrorCode errorCode) {
        super(errorCode.getDescription());
        this.errorCode = errorCode;
    }

    public CommonException(CommonErrorCode errorCode,String message) {
        super(message);
        this.errorCode = errorCode;
    }

    public CommonErrorCode getErrorCode() {
        return errorCode;
    }
}
